<template>
    <div class="shown">
        <Receives :mostExpectedList="mostExpectedList"></Receives>
        <Content :comingList="comingList"></Content>
    </div>
</template>

<script setup name="Shown">
import Receives from "components/Received/index.vue";
import Content from "components/Content/index.vue";
import { getMostExpected, getComingList } from "network/Home/index";
import { onMounted, ref } from "@vue/runtime-core";

const mostExpectedList = ref([]);
const comingList = ref([]);
onMounted(async () => {
    const { coming } = await getMostExpected({
        ci: 57,
        limit: 10,
        offset: 0,
        token: "",
        optimus_uuid: "1C71FF90C90311EBB8F897AC846D405CC8911BE7E0E0490B8A99FFF8F0F4A419",
        optimus_risk_level: 71,
        optimus_code: 10,
    });
    coming.forEach((ele) => {
        ele.img = ele.img.replace("w.h", "170.230");
    });
    mostExpectedList.value = [...coming];

    // 当天待映列表
    const { coming: res } = await getComingList({
        ci: 57,
        token: "",
        limit: 10,
        optimus_uuid: "1C71FF90C90311EBB8F897AC846D405CC8911BE7E0E0490B8A99FFF8F0F4A419",
        optimus_risk_level: 71,
        optimus_code: 10,
    });
    res.forEach((ele) => {
        ele.img = ele.img.replace("w.h", "128.180");
    });
    comingList.value = [...res];
});
</script>

<style lang="less" scoped></style>
